var Log = 
{
	
	error : function( msg )
	{
		Components.utils.reportError( "[todoTime] ERROR: "+ msg );
	},	
	
	warning : function( msg )
	{
		if( DEBUG )
		{
			  var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
                                 .getService(Components.interfaces.nsIConsoleService);
  			consoleService.logStringMessage( "[todoTime] WARNING: "+ msg );
		}
	},

	debug : function( msg ) {
		if( DEBUG )
		{
			  var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
                                 .getService(Components.interfaces.nsIConsoleService);
  			consoleService.logStringMessage( "[todoTime] DEBUG: "+ msg );
		}
	},
	
	dump : function( variable )
	{
		 var consoleService = Components.classes["@mozilla.org/consoleservice;1"]
                                 .getService(Components.interfaces.nsIConsoleService);
        var var_type = typeof variable;
        var msg = 'Dump : '+ var_type +NL;
		switch( var_type )
		{
			case 'array':
			case 'object':
				for( property in variable )
				{
					if( typeof variable[property] == 'function' ) variable[property] = 'function';
					msg += property +' : '+ variable[property] +NL;
				}
			break;
		}
		consoleService.logStringMessage( msg );
	}
}